package com.jishaokang.dao;

import com.jishaokang.model.dto.Course;
import com.jishaokang.model.dto.Learn;
import com.jishaokang.model.vo.CourseVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by NANA_Final on 2019/6/21.
 */
@Repository
public interface CourseDAO {

    int selectTotal(Course course);

    List<CourseVO> select(Course course);

    List<CourseVO> selectByLearnTotalDesc(Course course);

    int selectTotalByCost(Course course);

    List<CourseVO> selectByCostAsc(Course course);

    List<CourseVO> selectByCostDesc(Course course);

    int selectTotalByCostFree(Course course);

    List<CourseVO> selectByCostFree(Course course);

    List<CourseVO> selectByCourseTimeAsc(Course course);

    List<CourseVO> selectByCourseTimeDesc(Course course);

    int selectTotalByLabelFirst(Course course);

    List<CourseVO> selectByLabelFirst(Course course);

    int selectTotalByLabelSecond(Course course);

    List<CourseVO> selectByLabelSecond(Course course);

    int selectTotalByLabelThird(Course course);

    List<CourseVO> selectByLabelThird(Course course);

    int selectTotalByTeacherNameVague(Course course);

    List<CourseVO> selectByTeacherNameVague(Course course);

    int selectTotalByCourseNameVague(Course course);

    List<CourseVO> selectByCourseNameVague(Course course);

    CourseVO selectByCourseId(Course course);

    void insert(Course course);

    void update(Course course);

    void delete(int courseId);

    void updateCourseImage(Course course);

    int selectTotalByTeacherId(Course course);

    List<CourseVO> selectByTeacherId(Course course);

    void incLearnTotal(Integer courseId);

    int selectUserIdByCourseId(Integer courseId);

    int selectTotalByLabel(Course course);

    int selectTotalByTeacherNameAndCourseNameVague(Course course);

    List<CourseVO> selectByTeacherNameAndCourseNameVague(Course course);

    int selectTotalByTeacherNameOrCourseNameVague(Course course);

    List<CourseVO> selectByTeacherNameOrCourseNameVague(Course course);
}